package it.MicroApps.Tron3D;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.ImageView;

import android.view.Window;
import android.view.WindowManager;
 
public class Main extends Activity {
       
        private static final int STOPSPLASH = 0;
        //time in milliseconds
        private static final long SPLASHTIME = 8000;
       
        private ImageView splash;
       
        //handler for splash screen
        private Handler splashHandler = new Handler() {
                
                @Override
                public void handleMessage(Message msg) {
                        switch (msg.what) {
                        case STOPSPLASH:
                              
                                splash.setVisibility(View.GONE);
                                break;
                        }
                        super.handleMessage(msg);
                }
        };
       
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
           getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
           
       
        
       setContentView(R.layout.main);
       
     
       
                        splash=(ImageView)findViewById(R.id.splashscreen);
    
                                        splash.setOnClickListener(new ImageView.OnClickListener(){
                	public void onClick(View v){
                		 Message msg = new Message();
                               msg.what = STOPSPLASH;
                              splashHandler.sendMessageDelayed(msg, SPLASHTIME);
                        Intent i = new Intent(Main.this, Tron3D.class);
                       startActivity(i);}
                });
                        
    }
    
    @Override
    protected void onPause() {
        super.onPause();       
    }
    
	@Override
	protected void onDestroy() {
		super.onDestroy();
		

	}
	
	
}